﻿<%@ Page Title="" Language="C#" MasterPageFile="~/cms/cms.master" AutoEventWireup="true" CodeFile="ListGalleryImage.aspx.cs" Inherits="cms_ListGalleryImage" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentMain" Runat="Server">
    <h1 class="top-heading">List Gallery Image By <asp:Label ID="lbGalleryName" runat="server"></asp:Label></h1>
<table cellpadding="5" width="400">
    <tr>
        <td valign="top">Image:</td>
        <td class="style1">
            <asp:FileUpload ID="FileImage" runat="server" />
        </td>
    </tr>
    <tr>
        <td valign="top">Note:</td>
        <td class="style1">
            <asp:TextBox ID="txtNote" runat="server" CssClass="textbox" 
                Height="60" TextMode="MultiLine"></asp:TextBox></td>
    </tr>
    <tr>
        <td align="right">
            <asp:Button ID="btnAdd" runat="server" Text="Add" onclick="btnAdd_Click" /></td>
        <td class="style1">            
            <asp:Button ID="btnCancel" runat="server" Text="Cancel" 
                CausesValidation="False" PostBackUrl="~/cms/ListGallery.aspx" /></td>
    </tr>
</table>
<asp:GridView ID="GVGalleryImage" runat="server" AutoGenerateColumns="False" 
        DataKeyNames="ID" Width="100%" 
        AllowPaging="True" AllowSorting="True" PageSize="30" onrowcommand="GVGalleryImage_RowCommand" 
        >
        <Columns>        
            <asp:TemplateField>
                <ItemTemplate>
                    <asp:Image ID="Image1" runat="server" 
                        ImageUrl='<%# Eval("Image", "~/images/Gallery_Image/{0}") %>' Width="150" />
                </ItemTemplate>
                <ItemStyle Width="150px" />
            </asp:TemplateField>
            <asp:BoundField DataField="ID" HeaderText="ID" InsertVisible="False"
                ReadOnly="True" SortExpression="ID" >
            <HeaderStyle HorizontalAlign="Center" />
            <ItemStyle HorizontalAlign="Center" Width="50px" />
            </asp:BoundField>
            <asp:BoundField DataField="Note" HeaderText="Note" 
                SortExpression="Note" />
            <%--<asp:TemplateField ShowHeader="False">
                <ItemTemplate>
                    <asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="False" 
                        CommandName="Edit" Text="Edit" CommandArgument='<%# Eval("Id") %>'></asp:LinkButton>
                </ItemTemplate>
                <ItemStyle HorizontalAlign="Center" />
            </asp:TemplateField>--%>
            <asp:TemplateField ShowHeader="False">
                <ItemTemplate>
                    <asp:LinkButton ID="LinkButton2" runat="server" CausesValidation="False" OnClientClick="return confirm('Do you want to delete this ?');"
                        CommandName="Delete" Text="Delete" CommandArgument='<%# Eval("Id") %>' ></asp:LinkButton>
                </ItemTemplate>
                <ItemStyle HorizontalAlign="Center" Width="50px" />
            </asp:TemplateField>
        </Columns>
        <HeaderStyle BackColor="#006699" Font-Bold="True" ForeColor="White" 
            Font-Underline="False" Wrap="True" />
    </asp:GridView>
</asp:Content>

